package com.itheima.duotai.test1;

import java.sql.SQLOutput;

public class Demo1 {
    public static void main(String[] args) {
       Fu f = new Zi();
        System.out.println(f.num);
        Zi z = (Zi) f;
        z.method();
        z.show();
    }
}
class Fu{
    int num = 10;
    public void method(){
        System.out.println("父类的method方法");
    }
}
class Zi extends Fu{
    int num = 20;
    public void method(){
        System.out.println("子类的method方法");
    }
    public void show(){
        System.out.println("子类的show方法");
    }
}